package tech.yunland.shop.domain.service;

import com.moyuer.bsf.domain.dao.OrganDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.yunland.shop.domain.dao.DormitoriesDao;
import tech.yunland.shop.domain.dao.OrganDormitoriesDao;
import tech.yunland.shop.domain.model.OrganDormitories;

/**
 * Created by v on 17-7-4.
 */
@Service
public class OrganDormitoriesServiceImpl implements OrganDormitoriesService {

    @Autowired
    private OrganDormitoriesDao organDormitoriesDao;

    @Autowired
    private OrganDao organDao;

    @Override
    public void set(String odid, String oid) {
        OrganDormitories organDormitories = organDormitoriesDao.get(odid);
        organDormitories.setOrgan(organDao.get(oid));
        organDormitoriesDao.update(organDormitories);
    }
}
